/**
 * 
 */
package furniture.items3d.model.tessellation;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.vecmath.Vector3d;

import furniture.render3d.Polygon3d;
import furniture.render3d.TriangleSet;


/**
 * @author Grill Balazs (balage.g@gmail.com)
 *
 */
public class Triangles implements TriangleSet {

	private final List<Polygon3d> ts = new ArrayList<Polygon3d>();
	
	/**
	 * @see furniture.render3d.TriangleSet#getTriangles()
	 */
	public Collection<Polygon3d> getTriangles() {
		return ts;
	}
	
	public void addTriangle(Polygon3d item){
		ts.add(item);
	}

	public void translate(Vector3d vector) {
		for(Polygon3d t : ts) t.translate(vector);
	}

}
